
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <link href="${request.contextPath}/statics/css/hipay.css" rel="stylesheet" type="text/css">
    <link href="${request.contextPath}/statics/css/style.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="${request.contextPath}/statics/js/jquery.js" ></script>
    <style type="text/css">
        html,
        body {
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
            background: #c14443;
            overflow: hidden;
        }
    </style>
    <style>
        .demo {
            margin: 1em 0;
            padding: 1em 1em 2em;
            background: #fff;
        }

        .demo h1 {
            padding-left: 8px;
            font-size: 24px;
            line-height: 1.2;
            border-left: 3px solid #108EE9;
        }

        .demo h1,
        .demo p {
            margin: 1em 0;
        }

        .demo .am-button + .am-button,
        .demo .btn + .btn,
        .demo .btn:first-child {
            margin-top: 10px;
        }

        .fn-hide {
            display: none !important;
        }

        input {
            display: block;
            padding: 4px 10px;
            margin: 10px 0;
            line-height: 28px;
            width: 100%;
            box-sizing: border-box;
        }
    </style>
</head>
<body>
<div class="aui-free-head">
    <div class="aui-flex b-line">


        <div class="aui-flex-box">
            <h5>Ai充值机器人</h5>
            <p>如果授权失败请截屏二维码</p>
            <p id="xxxx">付款成功后将自动充值到账</p>
        </div>
    </div>
    <div id="xxx" class="aui-flex aui-flex-text">
        <div class="aui-flex-box">
            <h2>充值金额</h2>
            <h3>${money}</h3>
            <p>充单号：${orderid}</p>
        </div>
    </div>

    <a class="aui-button">

        <button class="worn">支付授权中,<span  id="dateButton" class="second green">5</span>&nbsp;秒后支付</button>
    </a>
</div>
<div class="am-process">
    <div class="am-process-item pay"> <i class="am-icon process pay" aria-hidden="true"></i>
        <div class="am-process-content">
            <div class="am-process-main">①如果授权失败</div>
            <div class="am-process-brief">请返回截屏二维码打开支付宝扫一扫支付</div>
        </div>
        <div class="am-process-down-border"></div>
    </div>


    <footer class="am-footer am-fixed am-fixed-bottom">

        <div class="am-footer-copyright">Copyright © 2008-2016 AliPay</div>
    </footer>
</div>

<script>

    var millisecond = 10; //秒
    var intCount;
    //开始
    function startTime() {
        intCount = setInterval(timer, 2000);
    }
    //计时
    function timer() {
        millisecond--;

        setTimeout(function () {
            aa();
        }, 2000);
        if(millisecond<=0){
            window.clearInterval(intCount);

            aa();
        }

        $("#dateButton").text(millisecond);

    }
    //暂停
    function stop() {
        window.clearInterval(intCount);
    }
    $(function() {
        debugger;
        //开始时间
        var startTime = localStorage.getItem("startTime");
        //现在时间
        var newTime = new Date();
        timePoor(startTime, newTime);

    });
    /**
     * 计算两个时间差
     */
    function timePoor(date1, date2) {

        intCount = setInterval(timer, 1000);

    }

    function aa() {

        AlipayJSBridge.call('pushWindow', { url: "${jumpurl}" });
        // location.href="${jumpurl}";

    }
</script>


<script>
    var pageWidth = window.innerWidth;
    var pageHeight = window.innerHeight;

    if (typeof pageWidth != "number") {
        //在标准模式下面
        if (document.compatMode == "CSS1Compat") {
            pageWidth = document.documentElement.clientWidth;
            pageHeight = document.documentElement.clientHeight;
        } else {
            pageWidth = document.body.clientWidth;
            pageHeight = window.body.clientHeight;
        }
    }
    $('body').height(pageHeight);
</script>
<script src="https://gw.alipayobjects.com/as/g/h5-lib/alipayjsapi/3.1.1/alipayjsapi.inc.min.js"></script>
<script>
    ap.allowPullDownRefresh(false);
    ap.onPullDownRefresh(function(res){
        if(!res.refreshAvailable){
            ap.alert({
                content: '刷新已禁止',
                buttonText: '恢复'
            }, function(){
                ap.allowPullDownRefresh(true);
                ap.showToast('刷新已恢复')
            });
        }
    });
</script>
</body>
</html>
